home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 9.5 KB | 503 lines | [TEXT/MPS ] |
- ;
- ; File: Editions.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__EDITIONS__') = 'UNDEFINED' THEN
- __EDITIONS__ SET 1
-
-
- IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
- include 'Memory.a'
- ENDIF
- ; include 'Types.a' ;
- ; include 'ConditionalMacros.a' ;
- ; include 'MixedMode.a' ;
-
- IF &TYPE('__FILES__') = 'UNDEFINED' THEN
- include 'Files.a'
- ENDIF
- ; include 'OSUtils.a' ;
-
- IF &TYPE('__ALIASES__') = 'UNDEFINED' THEN
- include 'Aliases.a'
- ENDIF
- ; include 'AppleTalk.a' ;
-
- IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
- include 'Dialogs.a'
- ENDIF
- ; include 'Errors.a' ;
- ; include 'Windows.a' ;
- ; include 'Quickdraw.a' ;
- ; include 'QuickdrawText.a' ;
- ; include 'Events.a' ;
- ; include 'Controls.a' ;
- ; include 'Menus.a' ;
- ; include 'TextEdit.a' ;
-
- ; resource types
- rSectionType EQU 'sect' ; ResType of saved SectionRecords
- ; Finder types for edition files
- kPICTEditionFileType EQU 'edtp'
- kTEXTEditionFileType EQU 'edtt'
- ksndEditionFileType EQU 'edts'
- kUnknownEditionFileType EQU 'edtu'
- kPublisherDocAliasFormat EQU 'alis'
- kPreviewFormat EQU 'prvw'
- kFormatListFormat EQU 'fmts'
-
- ; section types
- stSubscriber EQU $01
- stPublisher EQU $0A
- sumAutomatic EQU 0 ; subscriber update mode - Automatically
- sumManual EQU 1 ; subscriber update mode - Manually
- pumOnSave EQU 0 ; publisher update mode - OnSave
- pumManual EQU 1 ; publisher update mode - Manually
- kPartsNotUsed EQU 0
- kPartNumberUnknown EQU -1 ; misc
- kPreviewWidth EQU 120
- kPreviewHeight EQU 120
- ; bits for formatsMask
- kPICTformatMask EQU 1
- kTEXTformatMask EQU 2
- ksndFormatMask EQU 4
- ; pseudo-item hits for dialogHooks
- ; the first if for NewPublisher or NewSubscriber Dialogs
- emHookRedrawPreview EQU 150
- ; the following are for SectionOptions Dialog
- emHookCancelSection EQU 160
- emHookGoToPublisher EQU 161
- emHookGetEditionNow EQU 162
- emHookSendEditionNow EQU 162
- emHookManualUpdateMode EQU 163
- emHookAutoUpdateMode EQU 164
-
- ; the refcon field of the dialog record during a modalfilter
- ; or dialoghook contains one the following
- emOptionsDialogRefCon EQU 'optn'
- emCancelSectionDialogRefCon EQU 'cncl'
- emGoToPubErrDialogRefCon EQU 'gerr'
- kFormatLengthUnknown EQU -1
-
- ; one byte, stSubscriber or stPublisher
- ; seconds since 1904
- ; similar to ResType
- ; used in Edition I/O
- ; update modes
- ; sumAutomatic, pumSuspend, etc
- SectionRecord RECORD 0
- version ds.b 1 ; always 0x01 in system 7.0
- kind ds.b 1 ; stSubscriber or stPublisher
- mode ds.w 1 ; auto or manual
- mdDate ds.l 1 ; last change in document
- sectionID ds.l 1 ; app. specific, unique per document
- refCon ds.l 1 ; application specific
- alias ds.l 1 ; handle to Alias Record
- subPart ds.l 1 ; which part of container file
- nextSection ds.l 1 ; for linked list of app's Sections
- controlBlock ds.l 1 ; used internally
- refNum ds.l 1 ; used internally
- sizeof EQU 36
- ENDR
-
- EditionContainerSpec RECORD 0
- theFile ds FSSpec
- theFileScript ds.w 1
- thePart ds.l 1
- thePartName ds.l 8
- thePartScript ds.w 1
- sizeof EQU 110
- ENDR
-
- EditionInfoRecord RECORD 0
- crDate ds.l 1 ; date EditionContainer was created
- mdDate ds.l 1 ; date of last change
- fdCreator ds.l 1 ; file creator
- fdType ds.l 1 ; file type
- container ds EditionContainerSpec ; the Edition
- sizeof EQU 126
- ENDR
-
- NewPublisherReply RECORD 0
- canceled ds.b 1 ; O
- replacing ds.b 1
- usePart ds.b 1 ; I
- filler ds.b 1
- preview ds.l 1 ; I
- previewFormat ds.l 1 ; I
- container ds EditionContainerSpec ; I/O
- sizeof EQU 122
- ENDR
-
- NewSubscriberReply RECORD 0
- canceled ds.b 1 ; O
- formatsMask ds.b 1
- container ds EditionContainerSpec ;I/O
- sizeof EQU 112
- ENDR
-
- SectionOptionsReply RECORD 0
- canceled ds.b 1 ; O
- changed ds.b 1 ; O
- sectionH ds.l 1 ; I
- action ds.l 1 ; O
- sizeof EQU 10
- ENDR
-
-
- ioHasFormat EQU 0
- ioReadFormat EQU 1
- ioNewFormat EQU 2
- ioWriteFormat EQU 3
-
- eoOpen EQU 0
- eoClose EQU 1
- eoOpenNew EQU 2
- eoCloseNew EQU 3
- eoCanSubscribe EQU 4
-
- FormatIOParamBlock RECORD 0
- ioRefNum ds.l 1
- format ds.l 1
- formatIndex ds.l 1
- offset ds.l 1
- buffPtr ds.l 1
- buffLen ds.l 1
- sizeof EQU 24
- ENDR
-
- EditionOpenerParamBlock RECORD 0
- info ds EditionInfoRecord
- sectionH ds.l 1
- document ds.l 1
- fdCreator ds.l 1
- ioRefNum ds.l 1
- ioProc ds.l 1
- success ds.b 1
- formatsMask ds.b 1
- sizeof EQU 148
- ENDR
-
-
- sectionEventMsgClass EQU 'sect'
- sectionReadMsgID EQU 'read'
- sectionWriteMsgID EQU 'writ'
- sectionScrollMsgID EQU 'scrl'
- sectionCancelMsgID EQU 'cncl'
-
- currentEditionMgrVers EQU $0011
-
- IF GENERATING68K THEN
- Macro
- _InitEditionPackVersion
- move.w #$0100,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT InitEditionPackVersion
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _NewSection
- move.w #$0A02,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT NewSection
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _RegisterSection
- move.w #$0604,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT RegisterSection
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _UnRegisterSection
- move.w #$0206,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT UnRegisterSection
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _IsRegisteredSection
- move.w #$0208,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT IsRegisteredSection
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _AssociateSection
- move.w #$040C,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT AssociateSection
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _CreateEditionContainerFile
- move.w #$050E,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT CreateEditionContainerFile
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _DeleteEditionContainerFile
- move.w #$0210,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT DeleteEditionContainerFile
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _OpenEdition
- move.w #$0412,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT OpenEdition
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _OpenNewEdition
- move.w #$0814,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT OpenNewEdition
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _CloseEdition
- move.w #$0316,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT CloseEdition
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _EditionHasFormat
- move.w #$0618,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT EditionHasFormat
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _ReadEdition
- move.w #$081A,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT ReadEdition
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _WriteEdition
- move.w #$081C,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT WriteEdition
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetEditionFormatMark
- move.w #$061E,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT GetEditionFormatMark
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetEditionFormatMark
- move.w #$0620,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT SetEditionFormatMark
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetEditionInfo
- move.w #$0422,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT GetEditionInfo
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GoToPublisherSection
- move.w #$0224,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT GoToPublisherSection
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetLastEditionContainerUsed
- move.w #$0226,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT GetLastEditionContainerUsed
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetStandardFormats
- move.w #$0A28,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT GetStandardFormats
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetEditionOpenerProc
- move.w #$022A,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT GetEditionOpenerProc
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetEditionOpenerProc
- move.w #$022C,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT SetEditionOpenerProc
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _CallEditionOpenerProc
- move.w #$052E,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT CallEditionOpenerProc
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _CallFormatIOProc
- move.w #$0530,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT CallFormatIOProc
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _NewSubscriberDialog
- move.w #$0232,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT NewSubscriberDialog
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _NewSubscriberExpDialog
- move.w #$0B34,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT NewSubscriberExpDialog
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _NewPublisherDialog
- move.w #$0236,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT NewPublisherDialog
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _NewPublisherExpDialog
- move.w #$0B38,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT NewPublisherExpDialog
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SectionOptionsDialog
- move.w #$023A,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT SectionOptionsDialog
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SectionOptionsExpDialog
- move.w #$0B3C,d0
- dc.w $A82D
- EndM
- ELSE
- IMPORT SectionOptionsExpDialog
- ENDIF
-
- ENDIF ; __EDITIONS__
-